def numericSum(x):
    m= 0
    while x > 0:
        x =x//10
        n = x % 10
        m =m+ n
    return m
r=eval(input("请输入一个整数"))
print(numericSum(r))